<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>投票结果</title>
    </head>
    <body id="bodyId" style="background: url('../../img/cat.jpeg') no-repeat;background-size: 100% auto;">
        <div id="showmessage" style="position: absolute;top: 15%;left: 20%;width: 400px;height: 100px;background-color: rgb(213, 238, 208);border-radius: 100px;font-size: 30pt;text-align: center;padding-top: 50px;padding-bottom: 30px;">

        </div>
        <div style="position: absolute;top: 35%;left: 50%;width: 100px;height: 100px;background-color: rgb(213, 238, 208);border-radius: 100px;">
        </div>
        <div style="position: absolute;top: 45%;left: 60%;width: 50px;height: 50px;background-color: rgb(213, 238, 208);border-radius: 100px;">
        </div>
        <div id="hideText" style="display: none"><%=errcode%>|<%=votes%></div>
    </body>
    <script src="../../js/jquery.js"></script> 
    <script type="text/javascript">
        $(function() {
            var hideText = $("#hideText").html();
            var errcode =hideText.split("|")[0];
            var votes =hideText.split("|")[1];
            var v = parseInt(votes) -1;
            if(errcode == 0){//正常投票
                $("#showmessage").html("投票成功哦!您还剩"+ v +"张票!")
            }else if(errcode == 1000){//重复投票
                $("#showmessage").html("不能再投啦!已经投过了!")
            }else if(errcode == 1001){//没有票了
                $("#showmessage").html("呜呜呜...已经没有票了!")
            }
        })
    </script>
</html>